Skip to content

feat: add stats/incr/nancv#5949

Merged
Planeshifter merged 23 commits into
stdlib-js:developfrom
jalajk3004:nancv
Jul 7, 2026
Merged

feat: add stats/incr/nancv#5949
Planeshifter merged 23 commits into
stdlib-js:developfrom
jalajk3004:nancv

Conversation

@jalajk3004

Copy link
Copy Markdown
Contributor

Resolves #5555

Description

What is the purpose of this pull request?

This pull request:

  • adds a package nancv, which works like cv in which it calculates cv incrementally ignoring NaN values

Related Issues

Does this pull request have any related issues?

This pull request:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.


@stdlib-js/reviewers

@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Needs Review A pull request which needs code review. Good First PR A pull request resolving a Good First Issue. labels Mar 10, 2025
@stdlib-bot

stdlib-bot commented Mar 10, 2025

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/incr/nancv $\\color{green}141/141$
$\\color{green}+0.00\\%$
$\\color{green}11/11$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}141/141$
$\\color{green}+0.00\\%$

The above coverage report was generated for the changes in this PR.

@0PrashantYadav0

Copy link
Copy Markdown
Member

@jalajk3004 Your header files for README.md file is creating lint error here. Do make sure to configure editconfig file properly. Few require statement need to be in order.

@kgryte

kgryte commented Mar 12, 2025

Copy link
Copy Markdown
Member

All lint errors need to be resolved before this PR can be reviewed.

@kgryte kgryte added Needs Changes Pull request which needs changes before being merged. and removed Needs Review A pull request which needs code review. labels Mar 12, 2025
@jalajk3004

Copy link
Copy Markdown
Contributor Author

All lint errors are resolved, you can review this PR

- Forward the optional `mean` argument to incrcv (previously dropped, so the documented incrnancv([mean]) known-mean API was non-functional and silently ignored the argument)
- Correct the known-mean test, which asserted the unknown-mean result (0.5) and thereby masked the dropped-argument bug; expected value is now sqrt(2/3)/2
- Add a test asserting a TypeError is thrown for a non-number mean
- Guard the example against a null accumulated value (previously crashed via cv.toFixed on a leading NaN)
- Remove incorrect NaN-propagation note from index.d.ts; fix README/description NaN wording and example values
- Bump copyright year to 2026

@Planeshifter Planeshifter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after clean-up.

@Planeshifter Planeshifter added the Ready To Merge A pull request which is ready to be merged. label Jul 7, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

PR Commit Message

feat: add `stats/incr/nancv`

PR-URL: https://github.com/stdlib-js/stdlib/pull/5949
Closes: https://github.com/stdlib-js/stdlib/issues/5555

Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com>
Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>

Please review the above commit message and make any necessary adjustments.

@stdlib-bot stdlib-bot removed Needs Review A pull request which needs code review. Needs Changes Pull request which needs changes before being merged. labels Jul 7, 2026
@Planeshifter Planeshifter merged commit ade461e into stdlib-js:develop Jul 7, 2026
32 checks passed
@stdlib-bot stdlib-bot removed the Ready To Merge A pull request which is ready to be merged. label Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Good First PR A pull request resolving a Good First Issue. Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC]: add stats/incr/nancv

5 participants